Binary Dummy:
Multiple Categories Dummies:
c.
c.x#c.x
c.x#c.y
i.
i.Dummy1#i.Dummy2
gen dummy = (判断条件)
Interactions with Dummies:
*Example 7.10: Log Hourly Wage Equation reg lwage i.female##i.educ c.exper##c.exper c.tenure##c.tenure testparm 1.female 1.female#c.educ //检验男女的平均工资是否相同 testparm 1.female#c.educ //检验男女的教育回报率是否相同
Chow statistic:
Attention: 含i.x回归方程的检验不能用test而是用testparm。
i.x
test
testparm
Chow test:
chowtest y x1 x2 x3, group(组别)
LPM:
robust
logit
probit
reg y $x, r predict yhat replace yhat = max(0,min(1,yhat)) gen pred_class = (yhat >= 0.5)